package com.order.controller;

import com.order.model.OrderInfo;
import com.order.service.OrderService;
import com.product.model.ProductInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RequestMapping("/order")
@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;



    @RequestMapping("/{orderId}")
    public OrderInfo selectOrderById(@PathVariable Integer orderId){
        OrderInfo orderInfo = orderService.selectOrderById(orderId);
        return orderInfo;
    }
}
